﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MySql.Data.MySqlClient;
using System.Configuration;
using MySql.Data;
using System.Data;
using jycboliviaASP.net.Negocio;

namespace jycboliviaASP.net

{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
           /* MySqlConnection coneccionAlex = new MySqlConnection(ConfigurationManager.ConnectionStrings["MySqlCuadrosXXX"].ConnectionString);
            coneccionAlex.Open();
            MySqlCommand ComandoSelect = new MySqlCommand("select * from tb_encargado_pago");
            ComandoSelect.Connection = coneccionAlex;
            MySqlDataAdapter mdatos = new MySqlDataAdapter(ComandoSelect);
            DataSet datosMysql = new DataSet();
            mdatos.Fill(datosMysql);  */
            conexionMySql cnnalex = new conexionMySql();
            bool bandera =  cnnalex.ejecutarMySql("insert into tb_cargo(nombre,detalle) values('pruebaWeb5','esto es una prueba Web5');");
            DataSet datoTabla = cnnalex.consultaMySql("select * from tb_cargo;");
            TextBox1.Text = bandera.ToString();
            GridView1.DataSource = datoTabla;
            GridView1.DataBind();
            

            
        }
    }
}